Task Based Help > Customize Page Layout > Creating CanGrow/CanShrink Fields |
It is common for report fields to have content that may span multiple lines or collapse to no lines at all. In some cases, you may want to allow these fields to grow or shrink to fit their content rather than clip the excess or leave white spaces in the report.
To do this, in Design mode of the C1ReportDesigner, set the Field object's C1.C1Report.Field.CanGrow and C1.C1Report.Field.CanShrink properties to True.
Fields that grow push down the fields below them. Likewise, fields that can shrink push up the fields below them. Below in this case means "strictly" below, as shown in the following diagram:
Field 1 will push or pull fields 2 and 3 when it grows or shrinks. Field 4 will not be affected because it is not directly below field 1. The shaded area in the diagram shows the region affected by field 1.
If you want field 4 to remain aligned with fields 2 and 3, add an extra field spanning the whole area above fields 2 and 3. The new field will be pushed down by field 1 and will in turn push fields 2, 3, and 4. The following diagram shows this new layout:
Sample Report Available: For the complete report, see report "06: CanGrow CanShrink" in the CommonTasks.xml report definition file, which is available for download from the CommonTasks sample on the ComponentOne HelpCentral Sample page. |